import React, { memo, useContext } from 'react'
import { ThemeContext, UserContext } from './context'

const App = memo(() => {

  const user = useContext(UserContext)
  const theme = useContext(ThemeContext)

  return (
    <div>
      姓名：{user.name}
      年龄：{user.age}
      <div style={{color:theme.color}}>Theme</div>
    </div>
  )
})

export default App